home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / shadowlib.lha / shadow / Docs / ShadowUpdate.doc < prev   
Text File  |  1992-11-13  |  13KB  |  360 lines

  1.                        Shadow Development Documentation
  2.                             Library Version 5.0
  3.  
  4.                               By David Navas
  5.                          Updated:  13 Nov 1992
  6.  
  7.                       Copyright © 1992 by David Navas
  8.                             All Rights Reserved
  9.  
  10. V1.2 fixed the following bugs:
  11.  
  12.    Browser.c and gui.c should now compile without kludging with external
  13.    #includes.  Previously, I was using a precompiled header....
  14.  
  15.    Browser should no longer crash on 1.3 systems.  It won't work, but it
  16.    shouldn't crash (untested).
  17.  
  18.    Browser's premethod test (available if compiling with -dSPEEDTEST) is
  19.    more robust (uses METHOD_FLAG_CHECK_CONTINUE).
  20.  
  21.    Object's stored by name (like process objects) are now displayed by
  22.    name, instead of by object address as previously.
  23.  
  24.    Shadow now checks for a NULL method object passed to
  25.    RemovePatchedMethod().
  26.  
  27.    DJM() now correctly deals with patches that are patches on different
  28.    methods correctly.  Previously, it would send the method to all patches
  29.    defined for the class, irregardless of the method they were supposed
  30.    to be patching.
  31.  
  32.    InitOOProgram() initializes tc_UserData to NULL.
  33.  
  34.    DestroyMeta() eliminated, library vector replaced with MessageMaker().
  35.    DestroyMeta() is now taken care of by the METHOD_META_DESTROY method
  36.    of the associated meta.
  37.  
  38.    Processes now use anonymous ports.  Previously, the port was named the
  39.    same as FindTask(NULL)->tc_Node.ln_Name, but this meant you couldn't
  40.    run two of the same types of programs, leading to tricky hackery....
  41.  
  42.    Removed debugging printouts from the process module.  Hopefully they
  43.    are all gone, now.
  44.  
  45.    shadow_proto.h now correctly reflects that QuickDropString() and
  46.    DropString() do not return values.
  47.  
  48.    MessageMaker() now handles 'APTR' arguments that point to sized
  49.    arguments correctly.
  50.  
  51.    'TAGL' returns now freed correctly for Asnychronous messages.
  52.    (SHADOW_RETURN_TAGL)
  53.  
  54.    ParseJazzMessage() now handles unrecognized messages better.
  55.  
  56. V1.2 added the following features:
  57.  
  58.    Minor speed improvement in DJM(), especially when video contention is
  59.    high.  ExecBase is no longer retrieved from address four in that
  60.    function.
  61.  
  62.    Allows double to be returned from MethodFuncParse and from synchronous
  63.    messages.  DJM() still does not support returning a double, however --
  64.    it uses the D1 returned for the next feature....
  65.  
  66.    ....Added METHOD_FLAG_CHECK_CONTINUE which allows runtime-driven choice
  67.    for continuing a method-chain.  A method-chain is the name given to the
  68.    series of method sends that result from method patches.  Please see
  69.    AutoDocs [DJM()].
  70.  
  71.    MessageMaker() now an externally callable function.
  72.  
  73.    PSem() can now attempt to lock a semaphore, and returns TRUE/FALSE if
  74.    it was successful.
  75.  
  76.    Requesting DJM() to send a method ASYNC, now sends a slightly different
  77.    message structure to the process the method is run by.  At that point,
  78.    DJM() is run normally.  This allows METHOD_FLAG_CHECK_CONTINUE to
  79.    run correctly, so it is hoped.  Without it, no method would have
  80.    actually returned a value, as they would have all been sent
  81.    asynchronously.
  82.  
  83.    Asynchronous methods should now clean up after the resources that
  84.    they (might normally, if called) return.  This assumes you have
  85.    set up your MethodRef structure correctly.
  86.  
  87.    The RecurseBinTree() function and the InitTable() function now take
  88.    function callbacks that take their arguments in registers, rather than
  89.    on the stack as before.
  90.  
  91.    DJM() now checks the doMethd callback when getting the superclass
  92.    (SHADOW_MSG_SUPER).
  93.  
  94.  
  95. V1.2 changed the following names:
  96.  
  97.    RemovePatchedVerb() --> RemovePatchedMethod()
  98.  
  99.    All constants with JAZZ in their names have been changed to SHADOW.
  100.    There are still some function names that have Jazz as part of their
  101.    name rather than Shadow.  They will probably remain named as they are.
  102.  
  103.    my_putch() --> SprintfCallback()
  104.  
  105.    AddNodePriWatchedList() --> AddWatchedSListNode()
  106.  
  107.    various functions that began with lower case, now begins with upper-
  108.    case, for instance -- removeThread() --> RemoveThread().
  109.  
  110. V1.2 Outstanding problems:
  111.  
  112.    What to do if programmer trying to create a class that already exists?
  113.  
  114.    Changing BinTrees to AVL -- currently their performance is almost
  115.    always worst-case -- that is, singly-linked list.
  116.  
  117.    Should PSem(ATTEMPT) nest?
  118.  
  119.    Bugs?
  120.  
  121. --------------------------------------------------------------------------
  122.  
  123. V2.0 had some changes and bug fixes for Kent which apparently weren't
  124. tracked.  :(
  125. Apparently this includes bug fixes to the Cluster/Composite routines.
  126.  
  127. Changed many __asm functions to __regargs for DICE compatibility.
  128.  
  129. --------------------------------------------------------------------------
  130.  
  131. V3.0
  132.  
  133. Changed CreateMeta so that it calls INIT on itself as soon as the
  134. attributes and methods tables are set up.  This allows complicated
  135. memory allocation techniques to be used in class descriptions (such
  136. as using the memory allocation routines provided to allocate classes
  137. and objects).
  138.  
  139. See docs for new calling interface of that function.
  140.  
  141. Corrected CopyRight notices on header files.
  142.  
  143. --------------------------------------------------------------------------
  144. V3.1
  145.  
  146. Do[Pre|In|Post]fixBinTree(...) changed to Do[Pre|In|Post]OrderBinTree()
  147.  
  148. RecurseBinTree() now takes a function that returns BOOL rather than
  149. long.  If the function ever returns FALSE, RecurseBinTree() stops
  150. the recursive calls and returns FALSE.  Otherwise, RecurseBinTree()
  151. returns TRUE.
  152.  
  153. AVL trees now implemented for binary trees.
  154.  
  155. --------------------------------------------------------------------------
  156. V3.2 13 Jan 1992
  157.  
  158. RecurseBinTree now handles func() returns differently.  See AutoDocs.
  159.  
  160. Remove<blah>BinNode() functions now return sucess/failure of
  161. operation.  This includes the Watched BinTree operations as well.
  162.  
  163. AddClassWatcher() now more bullet-proof in low-memory conditions.
  164.  
  165. jp_process is -1 for process' without a parent.
  166.  
  167. AVL --> assembly.
  168.  
  169. W_SECOND value has changed.
  170. W_FUNC and W_MATCH_FUNC have been removed.  Please subclass the
  171. Dispatch Method and implement that functionality yourself.
  172.  
  173. --------------------------------------------------------------------------
  174. V4.0 14 Jan 1992
  175.  
  176. Director Class and Patcher Class has been much improved.  We hope....
  177.  
  178. In addition, AddPatchedMethod/RemovePatchedMethod have been superceded
  179. by the INIT/Remove methods of the Patcher Class.  This allows Patcher
  180. to be subclassed.
  181.  
  182. Directors can wath more than one place at a time with the new
  183. ESTABLISH/TERMINATE methods.
  184.  
  185. More AVL to assembler....(Insert)
  186.  
  187. --------------------------------------------------------------------------
  188. V4.1 19 Jan 1992
  189.  
  190. METHODHANDLERCLASS changed to PATCHERCLASS
  191.  
  192. ATTR_CORE of rootCluster fixed and renmed as ATTR_BAG
  193. DJM() in CreateSub[Class|Cluster] now uses object->cob_class instead of
  194. the passed class: works better for subclassing purposes
  195.  
  196. Added Semaphore checks in process thread startup and quit
  197.  
  198. Simplified ATTR_MANAGER structure for the flags field retrieval
  199. and setting.
  200.  
  201. Removed unnecessary JOBJ parameter in NOTIFY! method.
  202.  
  203. W_ANY_CHANGE removed -- not defined correctly anyway....
  204.  
  205. IpcARGTransfer for Meta destruction is handled better (hopefully
  206. even correctly)
  207.  
  208. --------------------------------------------------------------------------
  209. V4.2 28 Jan 1992
  210.  
  211. Last AVL function -- RemoveBinNode -- finally transferred to asm.
  212. Saved 500bytes!!!
  213.  
  214. Added ATTR_RESOURCEPROCESS to process class.  Unused, but you may
  215. keep track of resources on this watched binary tree.
  216.  
  217. FreeAllNodesBinTree can now free a tree that is NOT sorted by string
  218. but it MUST be sorted by the same value as the object, or it MUST be
  219. sorted on a value less than or equal to 255 and greater than or equal
  220. to 0.  This allows the AutoResourcss to add priority driven
  221. resources.
  222. Also changed AVL to sort on UNSIGNED rather than SIGNED keys.
  223.  
  224. Changed several EXCLUSIVE semaphores to SHARED, as they should be.
  225. Hangs on badly written code are now more likely!
  226.  
  227. RemoveCurrentProgram() now handles messages on the ports while it
  228. waits for all the processes using the program to stop using it.
  229.  
  230. BINTREE/LIST/VALUE constants have SHADOW_ added to them.
  231.  
  232. Added Resource Tracking calls for per process resource tracking:
  233.    AddAutoResource()
  234.    RemoveAutoResource()
  235.  
  236. Also added priority watched list which is auto-freed by PROCESSCLASS
  237. just before exitting.  This is where you might want to stick libraries,
  238. etc. in the future.
  239.           The ATTR_RESOURCETREE is freed during the process
  240.           METHOD_META_REMOVE method, once at the start of RemoveThread(),
  241.           and once at the finish.
  242.  
  243.           The ATTR_RESOURCESTACK is freed only at the start and finish of
  244.           RemoveThread().  This implies that the resources on the
  245.           ATTR_RESOURCESTACK must not reference the process, as
  246.           RemoveThread() is not called until there are no references on
  247.           a process.
  248.  
  249. Changed ATTR_RESOURCEPROCESS to ATTR_RESOURCETREE.
  250.  
  251. --------------------------------------------------------------------------
  252. V4.3 First Public Release 01 Feb 1992
  253.  
  254. Sigh, as always, I found a bug right after it was shipped.
  255. Browser no longer crashes when started under 1.3
  256.  
  257. --------------------------------------------------------------------------
  258. V4.4
  259.  
  260. System String code now clears the low bit of the passed string.
  261. Performance is hit a bit, but, using the browser, you should be
  262. able to find mistakes with the string code by noting a flakey first
  263. byte on your strings.
  264.  
  265. And I found some of mine -- methods and attributes are now aligned
  266. properly within shadow, browser, and control.
  267.  
  268. --------------------------------------------------------------------------
  269. V4.5
  270.  
  271. Strings can now be unaligned.  20% penalty for unaligned, 2% penalty for
  272. aligned.
  273.  
  274. --------------------------------------------------------------------------
  275. V4.6
  276.  
  277. Race condition removed from DIRECTORCLASS.  access is now properly
  278. semaphored.  Access granted via ShadowBase->sb_strSemaphore
  279.  
  280. Many additions to shadow.lib makes reading the source a bit easier.
  281.  
  282. --------------------------------------------------------------------------
  283. V4.7
  284.  
  285. Fixed bug with default attribute counts.  Should now work properly.
  286.  
  287. --------------------------------------------------------------------------
  288. V4.8
  289.  
  290. Methods now copy JMSG pointers correctly for Async messages.
  291.  
  292. --------------------------------------------------------------------------
  293. V4.9 18 May 1992
  294.  
  295. method.h include changed -- ForceMethodEnd fixed and ResetPtr() added.
  296.  
  297. The Method DESTROY no longer has a race condition with disappearing proc
  298. objects (we hope).  It does the following:
  299.    In DropObject() when about to send DESTROY:
  300.       if object->cob_class != object
  301.          UseObject(class)/Call Method/DropObject(class)
  302.       else if mh = FindMethodHandle(class, METHOD_META_DESTROY)
  303.          UseObject(mh->defnObject)/call method/DropObject(mh->defnObject)
  304.       else
  305.          UseObject(class->ccl_superClass)/call method/DropObject(super);
  306.  
  307.    In the ASYNC message parser (MessageParse):
  308.       UseObject(mh->defnObject)
  309.          call method
  310.       DropObject(mh->defnObject)
  311.  
  312.       Preserves return values of the method -- d0/d1/a0/a1, which is
  313.          certainly more than needed now!
  314.  
  315. Fixed a method caching bug which would not cache methods which
  316. were found by checking the superclass....  Leading to methods that were
  317. slower than necessary.
  318.  
  319. Added ReplaceObject() to shadow.lib, and fixed a few doc bugs as well.
  320.  
  321. Added SHADOW_RECURSE_BACKORDER for reversing the ordering of the INORDER.
  322. This allows GUI applications to render images from back to front, and
  323. search for regions from font to back.  Appropriate changes to binary.h
  324.  
  325. --------------------------------------------------------------------------
  326. V4.10 18 May 1992
  327.  
  328. METHOD_META_CREATE should have never been in rootClass.c nor rootCluster.c
  329. They aren't anymore....
  330.  
  331. --------------------------------------------------------------------------
  332. V4.10a 29 Jun 1992
  333.  
  334. Semaphore race condition bugs fixed (we hope).
  335.  
  336. --------------------------------------------------------------------------
  337. V4.11 09 Jul 1992
  338.  
  339. Semaphores fixed, DJM() functionality increased V4.11a, Process startup
  340. work to begin now to fix below bug.  Unfortunately, the fix will make me
  341. backwards incompatible, I think....
  342.  
  343. --------------------------------------------------------------------------
  344. Known bugs.  JM by Steve Koren.  Cannot change tc_UserData by any other than
  345. that particular task.
  346.  
  347. --------------------------------------------------------------------------
  348. V5.0  18 Sep 1992
  349.  
  350. Semaphores have many new features -- W/R/RW/maxcounts/Wait-on-alloc/etc.
  351. Method sends have lots of new functions -- auto-process-start, etc.
  352. Watcher changed to have name at first ptr after the CoreObject
  353. Many name changes.
  354.  
  355. See docs for new features, there's just too many to name!
  356. JM definitely fixed!
  357.  
  358. --------------------------------------------------------------------------
  359. Any problems should be sent e-mail to jazz@netcom.com or via BIX: dnavas.
  360.